xen/arm: Manage pl011 uart TX interrupt correctly
authorVijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Tue, 9 Dec 2014 04:39:55 +0000 (10:09 +0530)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 8 Jan 2015 13:44:57 +0000 (13:44 +0000)
commit20e297f84035da854ceb6a160981f78ed56a408b
treedf8ca26ea0a6729e2112f908cf69674a06adc3b3
parentc4811839210cebd41d5561456765b81d0b7c3c14
xen/arm: Manage pl011 uart TX interrupt correctly

In pl011.c, when TX interrupt is received
serial_tx_interrupt() is called to push next
characters. If TX buffer is empty, serial_tx_interrupt()
does not disable TX interrupt and hence pl011 UART
irq handler pl011_interrupt() always sees TX interrupt
status set in MIS register and cpu does not come out of
UART irq handler.

With this patch, mask TX interrupt by writing 0 to
IMSC register when TX buffer is empty and unmask by
writing 1 to IMSC register before sending characters.

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/drivers/char/pl011.c
xen/drivers/char/serial.c
xen/include/xen/serial.h